package com.qfedu.video.service.impl;


import com.qfedu.video.entry.Admin;
import com.qfedu.video.mapper.AdminMapper;
import com.qfedu.video.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    AdminMapper adminMapper;


    public String login(String username, String password) {

        Admin admin = new Admin();
        admin.setPassword(password);
        admin.setUserName(username);
        int count = adminMapper.selectCountUserNameAndPassword(admin);
        System.out.println(count+"++++++++++++");
        return count>0?"1":"0";
    }
}
